#pragma once

#include "Container.h"
#include "Config.h"

namespace db
{

class DataContainer : public Container
{
private:
    void*          m_data;
    u32            m_size;
public:
    void Load(ReadStream& file); 
    void Save(WriteStream& file) const; 
public:
    DataContainer();
    ~DataContainer();
    DataContainer(const void* data, const u32 size);
public:
    ERecordType GetType() const;
    
    std::wstring GetAsString() const;
    bool GetAsBool() const;
    u32 GetAsInt() const;
    f32 GetAsFloat() const;
    f64 GetAsDouble() const;

	u32 GetDataSize() const;
	const void* GetAsData() const;

    void Clear();

    void Set(const void* data, const u32 size);
};

};